package com.situ.crm.quartz;

import com.situ.crm.service.ICustomerLossService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 *
 * 查找客户流失，定时任务
 */
public class FindCustomerLossJob implements Job {

    @Autowired
    private ICustomerLossService customerLossService;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.out.println("work");
        //查询最近六个月没有订单的客户
        //将相应的数据插入到CustomerLoss表里面
        customerLossService.checkCustomerLoss();
    }
}
